FROM python:3.11-slim

# Install ffmpeg
RUN apt-get update && \
    apt-get install -y ffmpeg && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy probe script
COPY ffmpeg_probe_exporter.py .

# Install Python dependencies
RUN pip install --no-cache-dir prometheus_client

# Expose the Prometheus metrics port
EXPOSE 8001

# Run the app
CMD ["python", "ffmpeg_probe_exporter.py"]